package com.gzz.demo.pattern.command;

/**
 * 客户调用命
 */
public class ClientTest {
    public static void main(String[] args) {
        Receiver receiver=new Receiver(); //接收者。
        Invoker invoker = new Invoker(new SellCommand(receiver));
        invoker.action();

        Invoker invoker2 = new Invoker(new BuyCommand(receiver));
        invoker2.action();
    }
}
